﻿using System.Collections;
using System.Collections.Generic;
using Unity.Entities;
using UnityEngine;

public static class GlobalContext
{
    private static EntityManager entityManager;
    private static World world;

    public static void Initialize()
    {
        world = World.DefaultGameObjectInjectionWorld;
        entityManager = world.EntityManager;
    }

    public static EntityManager GetEntityManager() => entityManager;
#pragma warning disable IDE0022 // 使用方法的程序块主体
    public static World GetWorld() => world;
#pragma warning restore IDE0022 // 使用方法的程序块主体

    public static void UnInitialize()
    {
        world = null;
    }
}
